package com.spider.demo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

//家电
@Data
@AllArgsConstructor
@NoArgsConstructor
public class JD implements Switch{
    private String name;
    private boolean status;//状态 默认是关。

    @Override
    public void press() {
        status = !status;
    }
}
